package com.shop.event;

import org.hibernate.HibernateException;
import org.hibernate.event.internal.DefaultLoadEventListener;
import org.hibernate.event.spi.LoadEvent;

public class MyLoadListener extends DefaultLoadEventListener {
	private static final long serialVersionUID = 1L;

	@Override
	public void onLoad(LoadEvent event, LoadType loadType) throws HibernateException {
		System.out.println("自定义的load事件");
		System.out.println(event.getEntityClassName()+"=="+event.getEntityId());
		System.out.println("加载类型:"+loadType.getName());
		super.onLoad(event, loadType);
	}
}
